/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.zcm.modules.cxf.entity;

import com.zcm.modules.center.entity.CenterUser;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.zcm.common.persistence.DataEntity;

/**
 * ws会话控制Entity
 * @author wangwenwei
 * @version 2018-07-28
 */
public class CxfSession extends DataEntity<CxfSession> {
	
	private static final long serialVersionUID = 1L;
	private String sessionId;		// 会话ID
	private CenterUser user;		// 用户ID
	
	public CxfSession() {
		super();
	}

	public CxfSession(String id){
		super(id);
	}

	@Length(min=1, max=64, message="会话ID长度必须介于 1 和 64 之间")
	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}
	
	@NotNull(message="用户ID不能为空")
	public CenterUser getUser() {
		return user;
	}

	public void setUser(CenterUser user) {
		this.user = user;
	}
	
}